using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region Ticket

	/// <summary>
	/// Ticket object for NHibernate mapped table 'Ticket'.
	/// </summary>
	public class Ticket
	{
		#region Member Variables
		
		protected int _id;
		protected int _userId;
		protected int _groupId;
		protected string _orderId;
		protected string _ticketNumber;
		protected string _ticketPass;
		protected int _state; 

		#endregion

		#region Constructors

		public Ticket() { }

		public Ticket( int userId, int groupId, string orderId, string ticketNumber, string ticketPass, int state )
		{
			this._userId = userId;
			this._groupId = groupId;
			this._orderId = orderId;
			this._ticketNumber = ticketNumber;
			this._ticketPass = ticketPass;
			this._state = state;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual int UserId
		{
			get { return _userId; }
			set { _userId = value; }
		}

		public  virtual int GroupId
		{
			get { return _groupId; }
			set { _groupId = value; }
		}

		public  virtual string OrderId
		{
			get { return _orderId; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for OrderId", value, value.ToString());
				_orderId = value;
			}
		}

		public  virtual string TicketNumber
		{
			get { return _ticketNumber; }
			set
			{
				if ( value != null && value.Length > 10)
					throw new ArgumentOutOfRangeException("Invalid value for TicketNumber", value, value.ToString());
				_ticketNumber = value;
			}
		}

		public  virtual string TicketPass
		{
			get { return _ticketPass; }
			set
			{
				if ( value != null && value.Length > 10)
					throw new ArgumentOutOfRangeException("Invalid value for TicketPass", value, value.ToString());
				_ticketPass = value;
			}
		}

		public  virtual int State
		{
			get { return _state; }
			set { _state = value; }
		}

		

		#endregion
	}
	#endregion
}